<?php
/**
 * Created by PhpStorm.
 * User: xy001
 * Date: 2021/8/6
 * Time: 17:54
 */
namespace App\Exceptions;
use Throwable;


class ApiException extends Handler
{

    public function render($request, Throwable $exception)
    {

//        if (env('APP_DEBUG')) {
//            return parent::render($request, $exception);
//        }

        return response()->json([
            'code' => $exception->getCode(),
            'msg'  => $exception->getMessage()
        ]);
    }

}